<cfif NOT fileexists('#request.adminpath#config/scripts.cfm') OR isdefined('url.init')>
<cfprocessingdirective suppresswhitespace="yes">
<cfsavecontent variable="scriptfile">
<!---default javascript libraries--->
<cfoutput>
<script type="text/javascript" src="#request.absolutepath#js/jquery/1.7.1/jquery.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.core.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.widget.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.tabs.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.button.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.autocomplete.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.progressbar.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.mouse.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.dialog.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.position.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.sortable.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.accordion.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.autocomplete.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.datepicker.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.draggable.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.droppable.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.resizable.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.selectable.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/ui.slider.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.core.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.blind.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.bounce.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.clip.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.drop.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.explode.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.fade.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.fold.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.highlight.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.pulsate.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.scale.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.shake.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.slide.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/ui/jquery.effects.transfer.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/overlib.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/dropmenu.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/uploadify/swfobject.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/tinymce/jquery.tinymce.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/admin/core.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/cropper/jquery.color.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/cropper/jquery.Jcrop.js"></script>
<script type="text/javascript" src="#request.absolutepath#js/checkboxes/jquery.custom_radio_checkbox.js" ></script>
</cfoutput>

<!---load component specific javascripts if any--->
<cfif qcs.recordcount GT 1>
<cfloop query="qcs">
    <cfif directoryexists('#request.adminpath#components/#qcs.name#/js')>
		<cfdirectory action="list" directory="#request.adminpath#components/#qcs.name#/js" name="qscripts" type="file" filter="*.js">
       	<cfoutput query="qscripts">
			<script type="text/javascript" src="#request.absoluteadminpath#components/#qcs.name#/js/#qscripts.name#"></script>
        </cfoutput>
    </cfif>
 </cfloop>
</cfif>
</cfsavecontent>
<cffile action="write" output="#scriptfile#" file="#request.adminpath#config/scripts.cfm">
</cfprocessingdirective>
</cfif>
<cfinclude template="#request.absoluteadminpath#config/scripts.cfm">

<script language="javascript">
var FileBrowserDialogue = {
    init : function () {
        // Here goes your code for setting your custom things onLoad.
    },
    getlink : function (imgurl) {
        var URL = imgurl;
        var win = tinyMCEPopup.getWindowArg("window");

        // insert information now
        win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;

        // are we an image browser
        if (typeof(win.ImageDialog) != "undefined") {
            // we are, so update image dimensions...
            if (win.ImageDialog.getImageData)
                win.ImageDialog.getImageData();

            // ... and preview if necessary
            if (win.ImageDialog.showPreviewImage)
                win.ImageDialog.showPreviewImage(URL);
        }

        // close popup window
        tinyMCEPopup.close();
    }
}
/*End TinyMCE Integration */
</script>